//
//  SummaryHeaderViewController.m
//  CarHome
//
//  Created by lanou3g on 15-5-1.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "SummaryHeaderViewController.h"
#import "UIImageView+WebCache.h"


@interface SummaryHeaderViewController ()



@end

@implementation SummaryHeaderViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    /*
     UIImageView *headerView = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kWIDTH, kHEIGHT / 3)] autorelease];
     [headerView sd_setImageWithURL:[NSURL URLWithString:_si.logo] placeholderImage:[UIImage imageNamed:@"black_default_640*320"]];
     
     UILabel *leftLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, kHEIGHT / 3 - 18, 200, 15)];
     leftLabel.textColor = [UIColor whiteColor];
     [leftLabel setFont:[UIFont systemFontOfSize:12]];
     leftLabel.text = [NSString stringWithFormat:@"%@/%@", [_si levelname], [_si paramlist][1][@"value"]];
     
     UILabel *rightLabel = [[UILabel alloc] initWithFrame:CGRectMake(kWIDTH - 80, kHEIGHT / 3 - 18, 100, 15)];
     rightLabel.textColor = [UIColor whiteColor];
     [rightLabel setFont:[UIFont systemFontOfSize:12]];
     rightLabel.text = [NSString stringWithFormat:@"共%@张图", [_si piccount]];
     
     UIView *bottomImage = [[UIView alloc] initWithFrame:CGRectMake(0, kHEIGHT / 3 - 18, kWIDTH, 18)];
     bottomImage.backgroundColor = [UIColor blackColor];
     bottomImage.alpha = .01;
     [headerView addSubview:leftLabel];
     [headerView addSubview:rightLabel];
     [headerView addSubview:bottomImage];
     */
    
    self.view.frame = CGRectMake(0, 0, kWIDTH, kHEIGHT - 200);
    [_logoImage sd_setImageWithURL:[NSURL URLWithString:_si.logo] placeholderImage:[UIImage imageNamed:@"black_default_640*320"]];
    _levelValue.text = [NSString stringWithFormat:@"%@/%@", [_si levelname], [_si paramlist][1][@"value"]];
    _picCount.text = [NSString stringWithFormat:@"共%@张图", [_si piccount]];
    _name.text = _si.name;
    _price.text = _si.fctprice;
    _koubeiscore.text = [[NSString stringWithFormat:@"%@", _si.koubeiscore] isEqualToString:@"0"] ? @"暂无评分" : [NSString stringWithFormat:@"%@分", _si.koubeiscore];
    _dealerCount.text = [[NSString stringWithFormat:@"%@", _si.dealercount] isEqualToString:@"0"] ? @"暂无经销商" : [NSString stringWithFormat:@"%@家", _si.dealercount];
    _lowprice.text = [_si.lowprice isEqualToString:@""] ? @"暂无降价" : [NSString stringWithFormat:@"%@万起", _si.lowprice];
    _ershouCount.text = [[NSString stringWithFormat:@"%@", _si.usedCarCount] isEqualToString:@"0"] ? @"暂无车辆" : [NSString stringWithFormat:@"%@辆", _si.usedCarCount];
    
//
    
}

- (void)dealloc {
    [_logoImage release];
    [_levelValue release];
    [_picCount release];
    [_name release];
    [_price release];
    [_koubeiscore release];
    [_dealerCount release];
    [_lowprice release];
    [_ershouCount release];
    [super dealloc];
}
@end
